package com.juc.threadPoolExecutor.threadPoolExecutor10;



/**
 * setRejectedExecutionHandler(RejectedExecutionHandler handler)
 * getRejectedExecutionHandler()
 * 作用：可以处理任务被拒绝执行时的行为
 */
public class MyRunnable1 implements Runnable{
	private String username;
	
	public MyRunnable1(String username){
		super();
		this.username = username;
	}
	
	public String getUsername() {
		return this.username;
	}
	
	public void setUsername(String username) {
		this.username =username;
	}

	@Override
	public void run() {
		try {
			System.out.println(Thread.currentThread().getName() + "  " + System.currentTimeMillis());
			Thread.sleep(4000);
			System.out.println(Thread.currentThread().getName() + "  " + System.currentTimeMillis());
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
